package site.jlopen.kuscia.model.task.param;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class SfNodeEvalParam {

	private String domain;

	private String name;

	private String version;

	private List<String> attr_paths;

	private List<Map<String, Object>> attrs;

	public SfNodeEvalParam(String domain, String name, String version) {
		super();
		this.domain = domain;
		this.name = name;
		this.version = version;
	}

	public SfNodeEvalParam addAttPath(String attPath) {
		if(null == attr_paths) {
			attr_paths = new ArrayList<String>();
		}
		attr_paths.add(attPath);
		return this;
	}

	/*public SfNodeEvalParam addAttr(Map<String, Object> attr) {
		if(null == attrs) {
			attrs = new ArrayList<Map<String, Object>>();
		}
		attrs.add(attr);
		return this;
	}*/

	public SfNodeEvalParam addAttr(String key, Object value) {
		if(null == attrs) {
			attrs = new ArrayList<Map<String, Object>>();
		}
		Map<String, Object> map = new HashMap<String, Object>();
		map.put(key, value);
		attrs.add(map);
		return this;
	}
	
}
